<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/7/14
 * Time: 15:23
 */

namespace App\Http\Requests;


use App\Validate\BaseValidate;

class DriverOthersRequest extends BaseValidate
{
    protected $rule =[
        'city' => 'required',
        'company_id' => 'required',
        'address' => 'required',
        'real_name' => 'required',
        'identity' => 'required',
        'identity_photo' => 'required',
        'linkman' => 'required',
        'linkphone' => 'required',
        'relationship' => 'required',
        'licence_photo' => 'required',
        'number' => 'required',
        'licence_id' => 'required',
        'license_first' => 'required',
    ];
    /**
     * @var array
     * 验证提示
     */
    protected $message = [
        'city.required'=>'报名城市',
        'company_id.required'=>'报名地址',
        'address.required'=>'居住地',
        'real_name.required'=>'真实姓名',
        'identity.required'=>'请填写身份证',
        'identity_photo.required' =>'身份证正面照',
        'linkman.required' =>'紧急联系人',
        'linkphone.required' =>'紧急联系人电话',
        'relationship.required' =>'联系人关系',
        'licence_photo.required' =>'驾照必须',
        'licence_id.required' =>'驾照类型',
        'number.required' => '驾照档案编号',
        'license_first.required' => '初领驾驶证日期',
    ];

//    //自定义场景
//    protected $scene = [
//        'edit'=>"real_name,city,identity,identity_photo,licence_id,licence_photo,licence_end,company_id",
//        'add'=>"real_name,city,identity,identity_photo,licence_id,licence_photo,license_first,licence_end,company_id,car_num,restriction,people,colour",
//    ];
}